package com.suyeer.common;

import com.suyeer.basic.util.LogUtil;

import javax.servlet.*;
import java.io.IOException;

/**
 * Created by jun on 2018/7/25.
 * Record startup and closed time
 */
public class RunningMonitor implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        LogUtil.info("Provider startup...");
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {
        LogUtil.info("Provider closed...");
    }
}
